#include "Cart.h"
#include <iostream>
#include <sstream>

/*
	Author : Achmad Giovani
	Implementation of functions in Cart.h
*/

/* Constructors */
Cart::Cart(){}

Cart::Cart(int crt_id, int cst_id, Date pdate)
	:cart_id(crt_id),cust_id(cst_id),cart_purchase_date(pdate){
	}

/* Display cart */
string Cart::display() const{
		std::stringstream ss;

		ss	<< cart_id << "\t " 
				<< cust_id << "\t "
				<< cart_purchase_date.year() << "-" 
													<< cart_purchase_date.month() << "-"
													<< cart_purchase_date.day()
													<< endl;
		std::string output = ss.str();
		return output;
	}
	
Date Cart::get_purchase_date(){
	return cart_purchase_date;
}

int Cart::get_cart_id(){ 			/* AGV on S3 */
	return cart_id;
}

int Cart::get_cust_id(){ 			/* AGV on S3 */
	return cust_id;
}